<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN"> 
<head>
	<!-- INCLUDE meta.html -->
</head>
<body>
<div class='main'>

<div class="headerdiv">
	<!-- INCLUDE header.html -->
</div>

<div id='content'>
	<div id='left'>
    	<div style="margin:10px;margin-top:30px;">
        	<ul>
				<li>
					<a href="javascript:new_config()">{CONFIG_NEW}</a>
				</li>
				<!-- BEGIN group_list -->
					<li>
						<a href="admin.php?p=config&group={group}">{config_name:group}</a>
					</li>
				<!-- END -->
            </ul>
    		
        </div>
    </div>
    <div id='maindiv'>
    	<div class="description">
			{page_description}
        </div>
        
        <!-- IF err_msg -->
        <div class="err_msg pad">
        	{err_msg}
        </div>
        <!-- ENDIF -->
        
        <!-- IF success_msg -->
        <div class="success_msg pad">
        	{success_msg}
        </div>
        <!-- ENDIF -->
        
        <div class="real_content">
		
			<div id="new_config" style="display:<!-- IF thisconfig --><!-- ELSE -->none<!-- ENDIF -->;margin:20px;background-color:#FFFF99;width:400px;">
            	<h2>{NEW_CONFIG}</h2>
        		<!-- INCLUDE config_new.html -->
            </div>
	
		<input type="checkbox" onclick="$('[configname=name]').css('display',this.checked?'block':'none');" />{DISPLAY_NAME}
       	<br />
		<table cellpadding="0" cellspacing="0" border="0" class="list_table" style="width:600px;">
			<tr>
        		<th style="width:50px">{CONFIG_ORDER_ID}</th>
        		<th style="width:150px">{CONFIG_NAME}</th>
                <th style="width:200px">{CONFIG_VALUE}</th>
				<th style="width:100px">{CONFIG_GROUP}</th>
                <th style="width:100px">{CONFIG_OPTIONS}</th>
            </tr>
			<!-- BEGIN config_list -->
			<tr>
				<td valign="top">
					<div admin_type="text"
                	admin_para="m=update&table=config&column=order_id&id={config_id}"  
                    admin_trigger="click" style="text-align:center">{order_id}</div>
				</td>
				<td valign="top">
					<div  configname="name"  admin_type="text"
            		admin_para="m=update&table=config&column=name&id={config_id}"  
                	admin_trigger="click" style="display:none">{name}</div>
					<div admin_type="text"
	            	admin_para="m=update&table=config&column=description&id={config_id}"  
	                admin_trigger="click" >{description}</div>
				</td>
				<td valign="top">
					<div admin_type="<?php if (!$_obj['type']) echo 'text'; else echo $_obj['type']; ?>"
                	admin_para="m=update&table=config&column=value&id={config_id}"  
                    admin_trigger="click" >{htmlspecialchars:value}</div>
				</td>
				<td valign="top">
					<div admin_type="text"
                	admin_para="m=update&table=config&column=group&id={config_id}"  
                    admin_trigger="click" >{group}</div>
				</td>
				<td valign="top">
					<a href="javascript:;" onclick="if (confirm('{DELETE_CONFIRM}')) delete_config({config_id},this)">{CONFIG_DELETE}</a>
				</td>
			</tr>
			<!-- END -->
		</table>

                <br />
                <br />


        </div>
        
    </div>
</div>

<script>

function new_config()
{
	$('#new_config').fadeTo(10,0).slideDown(200).fadeTo('fast',1);
}
function cancel_new_config()
{
	$('#new_config').fadeTo('fast',0).slideUp(200);
}
function delete_config(id,o)
{
	$(o).attr('to_be_delete','yes').html('{DELETING}').unbind('click');
	$.post('admin.php?p=ajax&m=delete&table=config&id='+id,{ },delete_callback);
}
function delete_callback(s)
{
	if (s == 'error')
	{
		alert('{DELETE_ERROR}');
		return false;
	}
	$('[to_be_delete=yes]').parent().parent().fadeOut();
}

</script>

<!-- INCLUDE footer.html -->

</div>
</body>
</html>